﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000107 RID: 263
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class BattleRelic : IMessage<BattleRelic>, IMessage, IEquatable<BattleRelic>, IDeepCloneable<BattleRelic>, IBufferMessage
	{
		// Token: 0x17000385 RID: 901
		// (get) Token: 0x06000BF9 RID: 3065 RVA: 0x00023927 File Offset: 0x00021B27
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<BattleRelic> Parser
		{
			get
			{
				return BattleRelic._parser;
			}
		}

		// Token: 0x17000386 RID: 902
		// (get) Token: 0x06000BFA RID: 3066 RVA: 0x0002392E File Offset: 0x00021B2E
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return BattleRelicReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17000387 RID: 903
		// (get) Token: 0x06000BFB RID: 3067 RVA: 0x00023940 File Offset: 0x00021B40
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return BattleRelic.Descriptor;
			}
		}

		// Token: 0x06000BFC RID: 3068 RVA: 0x00023947 File Offset: 0x00021B47
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRelic()
		{
		}

		// Token: 0x06000BFD RID: 3069 RVA: 0x0002395C File Offset: 0x00021B5C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRelic(BattleRelic other) : this()
		{
			this.id_ = other.id_;
			this.level_ = other.level_;
			this.mainAffixId_ = other.mainAffixId_;
			this.subAffixList_ = other.subAffixList_.Clone();
			this.uniqueId_ = other.uniqueId_;
			this.setId_ = other.setId_;
			this.type_ = other.type_;
			this.rarity_ = other.rarity_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06000BFE RID: 3070 RVA: 0x000239E5 File Offset: 0x00021BE5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleRelic Clone()
		{
			return new BattleRelic(this);
		}

		// Token: 0x17000388 RID: 904
		// (get) Token: 0x06000BFF RID: 3071 RVA: 0x000239ED File Offset: 0x00021BED
		// (set) Token: 0x06000C00 RID: 3072 RVA: 0x000239F5 File Offset: 0x00021BF5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x17000389 RID: 905
		// (get) Token: 0x06000C01 RID: 3073 RVA: 0x000239FE File Offset: 0x00021BFE
		// (set) Token: 0x06000C02 RID: 3074 RVA: 0x00023A06 File Offset: 0x00021C06
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x1700038A RID: 906
		// (get) Token: 0x06000C03 RID: 3075 RVA: 0x00023A0F File Offset: 0x00021C0F
		// (set) Token: 0x06000C04 RID: 3076 RVA: 0x00023A17 File Offset: 0x00021C17
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint MainAffixId
		{
			get
			{
				return this.mainAffixId_;
			}
			set
			{
				this.mainAffixId_ = value;
			}
		}

		// Token: 0x1700038B RID: 907
		// (get) Token: 0x06000C05 RID: 3077 RVA: 0x00023A20 File Offset: 0x00021C20
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<RelicAffix> SubAffixList
		{
			get
			{
				return this.subAffixList_;
			}
		}

		// Token: 0x1700038C RID: 908
		// (get) Token: 0x06000C06 RID: 3078 RVA: 0x00023A28 File Offset: 0x00021C28
		// (set) Token: 0x06000C07 RID: 3079 RVA: 0x00023A30 File Offset: 0x00021C30
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint UniqueId
		{
			get
			{
				return this.uniqueId_;
			}
			set
			{
				this.uniqueId_ = value;
			}
		}

		// Token: 0x1700038D RID: 909
		// (get) Token: 0x06000C08 RID: 3080 RVA: 0x00023A39 File Offset: 0x00021C39
		// (set) Token: 0x06000C09 RID: 3081 RVA: 0x00023A41 File Offset: 0x00021C41
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint SetId
		{
			get
			{
				return this.setId_;
			}
			set
			{
				this.setId_ = value;
			}
		}

		// Token: 0x1700038E RID: 910
		// (get) Token: 0x06000C0A RID: 3082 RVA: 0x00023A4A File Offset: 0x00021C4A
		// (set) Token: 0x06000C0B RID: 3083 RVA: 0x00023A52 File Offset: 0x00021C52
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Type
		{
			get
			{
				return this.type_;
			}
			set
			{
				this.type_ = value;
			}
		}

		// Token: 0x1700038F RID: 911
		// (get) Token: 0x06000C0C RID: 3084 RVA: 0x00023A5B File Offset: 0x00021C5B
		// (set) Token: 0x06000C0D RID: 3085 RVA: 0x00023A63 File Offset: 0x00021C63
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Rarity
		{
			get
			{
				return this.rarity_;
			}
			set
			{
				this.rarity_ = value;
			}
		}

		// Token: 0x06000C0E RID: 3086 RVA: 0x00023A6C File Offset: 0x00021C6C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as BattleRelic);
		}

		// Token: 0x06000C0F RID: 3087 RVA: 0x00023A7C File Offset: 0x00021C7C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(BattleRelic other)
		{
			return other != null && (other == this || (this.Id == other.Id && this.Level == other.Level && this.MainAffixId == other.MainAffixId && this.subAffixList_.Equals(other.subAffixList_) && this.UniqueId == other.UniqueId && this.SetId == other.SetId && this.Type == other.Type && this.Rarity == other.Rarity && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06000C10 RID: 3088 RVA: 0x00023B2C File Offset: 0x00021D2C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			if (this.MainAffixId != 0U)
			{
				num ^= this.MainAffixId.GetHashCode();
			}
			num ^= this.subAffixList_.GetHashCode();
			if (this.UniqueId != 0U)
			{
				num ^= this.UniqueId.GetHashCode();
			}
			if (this.SetId != 0U)
			{
				num ^= this.SetId.GetHashCode();
			}
			if (this.Type != 0U)
			{
				num ^= this.Type.GetHashCode();
			}
			if (this.Rarity != 0U)
			{
				num ^= this.Rarity.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06000C11 RID: 3089 RVA: 0x00023C0F File Offset: 0x00021E0F
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06000C12 RID: 3090 RVA: 0x00023C17 File Offset: 0x00021E17
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06000C13 RID: 3091 RVA: 0x00023C20 File Offset: 0x00021E20
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Id != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.Id);
			}
			if (this.Level != 0U)
			{
				output.WriteRawTag(16);
				output.WriteUInt32(this.Level);
			}
			if (this.MainAffixId != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.MainAffixId);
			}
			this.subAffixList_.WriteTo(ref output, BattleRelic._repeated_subAffixList_codec);
			if (this.UniqueId != 0U)
			{
				output.WriteRawTag(40);
				output.WriteUInt32(this.UniqueId);
			}
			if (this.SetId != 0U)
			{
				output.WriteRawTag(48);
				output.WriteUInt32(this.SetId);
			}
			if (this.Type != 0U)
			{
				output.WriteRawTag(56);
				output.WriteUInt32(this.Type);
			}
			if (this.Rarity != 0U)
			{
				output.WriteRawTag(64);
				output.WriteUInt32(this.Rarity);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06000C14 RID: 3092 RVA: 0x00023D18 File Offset: 0x00021F18
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			if (this.MainAffixId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.MainAffixId);
			}
			num += this.subAffixList_.CalculateSize(BattleRelic._repeated_subAffixList_codec);
			if (this.UniqueId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.UniqueId);
			}
			if (this.SetId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.SetId);
			}
			if (this.Type != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Type);
			}
			if (this.Rarity != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Rarity);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06000C15 RID: 3093 RVA: 0x00023DFC File Offset: 0x00021FFC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(BattleRelic other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			if (other.MainAffixId != 0U)
			{
				this.MainAffixId = other.MainAffixId;
			}
			this.subAffixList_.Add(other.subAffixList_);
			if (other.UniqueId != 0U)
			{
				this.UniqueId = other.UniqueId;
			}
			if (other.SetId != 0U)
			{
				this.SetId = other.SetId;
			}
			if (other.Type != 0U)
			{
				this.Type = other.Type;
			}
			if (other.Rarity != 0U)
			{
				this.Rarity = other.Rarity;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06000C16 RID: 3094 RVA: 0x00023EC1 File Offset: 0x000220C1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06000C17 RID: 3095 RVA: 0x00023ECC File Offset: 0x000220CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 34U)
				{
					if (num <= 16U)
					{
						if (num == 8U)
						{
							this.Id = input.ReadUInt32();
							continue;
						}
						if (num == 16U)
						{
							this.Level = input.ReadUInt32();
							continue;
						}
					}
					else
					{
						if (num == 24U)
						{
							this.MainAffixId = input.ReadUInt32();
							continue;
						}
						if (num == 34U)
						{
							this.subAffixList_.AddEntriesFrom(ref input, BattleRelic._repeated_subAffixList_codec);
							continue;
						}
					}
				}
				else if (num <= 48U)
				{
					if (num == 40U)
					{
						this.UniqueId = input.ReadUInt32();
						continue;
					}
					if (num == 48U)
					{
						this.SetId = input.ReadUInt32();
						continue;
					}
				}
				else
				{
					if (num == 56U)
					{
						this.Type = input.ReadUInt32();
						continue;
					}
					if (num == 64U)
					{
						this.Rarity = input.ReadUInt32();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x040004F5 RID: 1269
		private static readonly MessageParser<BattleRelic> _parser = new MessageParser<BattleRelic>(() => new BattleRelic());

		// Token: 0x040004F6 RID: 1270
		private UnknownFieldSet _unknownFields;

		// Token: 0x040004F7 RID: 1271
		public const int IdFieldNumber = 1;

		// Token: 0x040004F8 RID: 1272
		private uint id_;

		// Token: 0x040004F9 RID: 1273
		public const int LevelFieldNumber = 2;

		// Token: 0x040004FA RID: 1274
		private uint level_;

		// Token: 0x040004FB RID: 1275
		public const int MainAffixIdFieldNumber = 3;

		// Token: 0x040004FC RID: 1276
		private uint mainAffixId_;

		// Token: 0x040004FD RID: 1277
		public const int SubAffixListFieldNumber = 4;

		// Token: 0x040004FE RID: 1278
		private static readonly FieldCodec<RelicAffix> _repeated_subAffixList_codec = FieldCodec.ForMessage<RelicAffix>(34U, RelicAffix.Parser);

		// Token: 0x040004FF RID: 1279
		private readonly RepeatedField<RelicAffix> subAffixList_ = new RepeatedField<RelicAffix>();

		// Token: 0x04000500 RID: 1280
		public const int UniqueIdFieldNumber = 5;

		// Token: 0x04000501 RID: 1281
		private uint uniqueId_;

		// Token: 0x04000502 RID: 1282
		public const int SetIdFieldNumber = 6;

		// Token: 0x04000503 RID: 1283
		private uint setId_;

		// Token: 0x04000504 RID: 1284
		public const int TypeFieldNumber = 7;

		// Token: 0x04000505 RID: 1285
		private uint type_;

		// Token: 0x04000506 RID: 1286
		public const int RarityFieldNumber = 8;

		// Token: 0x04000507 RID: 1287
		private uint rarity_;
	}
}
